﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace FormulaRunning.Models
{
    public class Formula
    {
        public int FormulaID { get; set; }

        [Required]
        public string UserName { get; set; }

        [Required]
        public string Title { get; set; }

        [Required]
        public string Description { get; set; }

        [Required]
        [DataType(DataType.Date)]
        public DateTime SubmitTime { get; set; }

        [Required]
        //字符串内部表现形式
        public string FormulaString { get; set; }

        public virtual ICollection<Tag> Tags {get;set;}

        public virtual ICollection<Comment> Comments { get; set; }
    }
}